-- GENERATED SPELL FOR [Twilight Worshipper] --


function spell0_30111(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(61567,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30111', 640, 1)
end

function spell1_30111(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30111', 3000, 1)
end

function spell2_30111(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(61568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30111', 10000, 1)
end

function spell3_30111(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(56858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30111', 11000, 1)
end

function Sorts_30111(pUnit, Event)
local choix_sorts_30111 = math.random(0, 3)
if choix_sorts_30111 == 0 then
pUnit:RegisterEvent('spell0_30111', 1, 1)
end
if choix_sorts_30111 == 1 then
pUnit:RegisterEvent('spell1_30111', 1, 1)
end
if choix_sorts_30111 == 2 then
pUnit:RegisterEvent('spell2_30111', 1, 1)
end
if choix_sorts_30111 == 3 then
pUnit:RegisterEvent('spell3_30111', 1, 1)
end
end

function mob30111_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30111', math.random(1500, 3000), 1)
end

function mob30111_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30111_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30111_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30111, 1, 'mob30111_Action')
RegisterUnitEvent(30111, 2, 'mob30111_Leave')
RegisterUnitEvent(30111, 3, 'mob30111_Kill')
RegisterUnitEvent(30111, 4, 'mob30111_Die')
